#pragma once
#include "../BaseLib/HTMLLoggerDecorator.h"
#include "../BaseLib/Logger.h"
#include "../Event/EventManager.h"
#include "../Event/Events.h"
#include <cassert>
#include <memory>

namespace Kriko
{
	extern BaseLib::Timer g_Timer;
	extern BaseLib::Logger<BaseLib::HTMLLoggerDecorator> g_Logger;
	extern EventManager g_EventManager;

	template<typename T>
	using Scope = std::unique_ptr<T>;
	template<typename T, typename ... Args>
	constexpr Scope<T> CreateScope(Args&& ... args)
	{
		return std::make_unique<T>(std::forward<Args>(args)...);
	}

	template<typename T>
	using Ref = std::shared_ptr<T>;
	template<typename T, typename ... Args>
	constexpr Ref<T> CreateRef(Args&& ... args)
	{
		return std::make_shared<T>(std::forward<Args>(args)...);
	}
}
